package lianxi6;
//计算机系
public class computerDept extends Student{
    private double operation;//操作能力
    private double engWriting;//英语写作
    private double finalExam;//期末考试
    private double midExam;//期中考试

    public computerDept(String sid, String sname, String ssex, int sage, double operation, double engWriting, double finalExam, double midExam) {
        super(sid, sname, ssex, sage);
        this.operation = operation;
        this.engWriting = engWriting;
        this.finalExam = finalExam;
        this.midExam = midExam;
    }

    public double getOperation() {
        return operation;
    }

    public double getEngWriting() {
        return engWriting;
    }

    public double getFinalExam() {
        return finalExam;
    }

    public double getMidExam() {
        return midExam;
    }

    @Override
    public String toString() {
        return "计算机系：学号：'" + getSid() + '\'' +
                ", 姓名：'" + getSname() + '\'' +
                ", 性别：'" + getSsex() + '\'' +
                ", 年龄：'" + getSage() + '\'' +
                ", 综合成绩：'" + (getOperation()*0.4 + getEngWriting()*0.2 + getFinalExam()*0.2 + getMidExam()*0.2)+'\'' +
                '}';
    }
}
